<!--
 * @Date: 2022-10-29 01:50:41
 * @Author: liutaotao 17386012013@163.com
 * @LastEditTime: 2022-10-29 01:54:17
 * @LastEditors: liutaotao 17386012013@163.com
 * @FilePath: \vite-project\src\components\HelloWorld.vue
 * @Description: 
-->
<script setup lang="ts">
  import { ref } from "vue";
  import SvgIcon from "./SvgIcon.vue";

  defineProps<{ msg: string }>();
  const emit = defineEmits<{
    (e: "setName", name: string): void;
  }>();

  const sayName = () => {
    count.value++;
    emit("setName", "HelloWorld");
  };

  const count = ref(0);
</script>

<template>
  <h2>{{ msg }}</h2>
  <SvgIcon></SvgIcon>
  <button
    type="button"
    @click="sayName">
    count is {{ count }}
  </button>
</template>

<style scoped>
  .read-the-docs {
    color: #888;
  }
</style>
